#ifndef __FOC_PMSM_H
#define __FOC_PMSM_H

#include <stdint.h>
#include "motor_structure.h"

//#define _IQdivision(Dividend, Divisor, Quotient, Remainder)    {\
//    MATH_ACC->MODE = MATH_ACC_MODE_DIVISION;\
//    MATH_ACC->OP0 = Dividend;\
//    MATH_ACC->OP1 = Divisor;\
//    MATH_ACC->START = MATH_ACC_START_START_Msk;\
//    while (((MATH_ACC->SR & (MATH_ACC_SR_BUSY_Msk)) != 0x00u));\
//    Quotient = (int16_t)MATH_ACC->OP0;\
//    Remainder = (int16_t)MATH_ACC->OP1;}

void DcBus_Ripple_suppress(MCFLIB_2_ALBE_T_S16 *sVAlBeIn,Q15_t s16Vbus, MCFLIB_2_ALBE_T_S16 *sVAlBe_Out);
void FOC_Current_Controller(FOC_TypeDef *pFOC);
void PMSM_Obs(FOC_TypeDef *pFOC);


#endif
